package com.ihr360.payroll.service.alps.profile.provider;

import com.ihr360.alps.IServiceProfile;
import com.ihr360.alps.api.ServiceProvider;
import com.ihr360.commons.model.type.WorkHourType;
import com.ihr360.expr.parser.ExprToken;
import com.ihr360.payroll.service.alps.profile.OverTimeRuleServiceProfile;
import com.ihr360.payroll.service.alps.profile.PersonLeaveServiceProfile;

public class PersonalLeaveParamProvider implements ProfileParamProvider {
    @Override
    public String logTitle() {
        return "[事假扣款规则]";
    }

    @Override
    public String buildVariable(WorkHourType workHourType, IServiceProfile profile) {
            StringBuilder builder = new StringBuilder(ServiceProvider.SERVICE_ID.SALARY_PL_RULE);
            builder.append(ExprToken.NS_FIELD_CONNECTOR.val);
            builder.append(profile.getCode());
            return builder.toString();
    }

    @Override
    public IServiceProfile numOpRatio() {
       return null;
    }

    @Override
    public IServiceProfile baseRatio() {
        return PersonLeaveServiceProfile.baseRatio;
    }

    @Override
    public IServiceProfile monthlyWorkDays() {
        return OverTimeRuleServiceProfile.monthWorkCount;
    }

    @Override
    public IServiceProfile dailyWorkHours() {
        return OverTimeRuleServiceProfile.dayWorkCount;
    }

    @Override
    public IServiceProfile calcBase() {
        return OverTimeRuleServiceProfile.calcBase;
    }
}